package customer

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/common/utils"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/dto/aggregation"
)

type CustomerManageRepositoryIface interface {
	GetCustomerByOrganizingCodeOrCompanyName(ctx context.Context, id int64, organizingCode, companyName string) (*CustomerPo, error)
	GetCustomerInfo(ctx context.Context, condition map[string]interface{}) (*CustomerPo, error)
	QueryCustomerList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*CustomerListItemPo, error)
	QuerySimpleCustomerList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*CustomerPo, error)
	SaveCustomer(ctx context.Context, po *CustomerPo) (*CustomerPo, error)
	SaveCustomerGroup(ctx context.Context, userId, customerId int64, groups []string) error
	SaveCustomerIndex(ctx context.Context, po *CustomerIndexPo) error
	SaveCustomerTags(ctx context.Context, po *CustomerTagPo) error
	DeleteCustomer(ctx context.Context, userId, id int64) error
	GetCustomerGroup(ctx context.Context) ([]string, error)
	CustomerUseRank(ctx context.Context, beginDate, endDate string, pageInfo *utils.PageInfo) ([]*aggregation.UseRankItem, error)
	GetCurrentMonthCustomerCount(ctx context.Context, userId int64, monthStart string, monthEnd string) (int64, error)
}
